#pragma once

#include "CMyDlg.h"
#include "Scene.h"

class CMyFrame : public CFrameWnd
{
	DECLARE_MESSAGE_MAP()
public:
	Scene* m_scene;		// 场景对象
	Camera* m_camera;	// 相机对象
	HACCEL m_hAccKey;	// 加速键

public:
	CMyFrame() : m_scene(nullptr), m_camera(nullptr)
	{
		// 加速键初始化
		m_hAccKey = LoadAccelerators(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDR_ACCELERATOR1));
	}

	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	virtual BOOL PreTranslateMessage(MSG* pMsg);

	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnPaint();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg void OnDestroy();

	afx_msg void OnOpen();
	afx_msg void OnSave();
	afx_msg void OnDel();
	afx_msg void OnQem();
	afx_msg void OnLine();
	afx_msg void OnFill();
	afx_msg void OnLight();
	afx_msg void OnCamera();
	afx_msg void OnMove();
	afx_msg void OnCopy();
	afx_msg void OnPaste();
	afx_msg void OnSign();
	afx_msg void On3dmodel();
	afx_msg void OnMaterial();
	afx_msg void OnTriangulate();
};
